import request from '@/utils/request'
/**
 * 新增部门
 * @param {*} data
 * @returns
 */
export function addDepartment(data) {
  return request({
    method: 'post',
    url: '/company/department',
    data
  })
}
/**
 * 查询企业部门列表
 * @param
 * @returns
 */
export function getDepartment() {
  return request({
    method: 'get',
    url: '/company/department'
  })
}
/**
 * 根据id修改部门详情
 * @param {*} data
 * @returns
 */
export function putDepartment(data) {
  return request({
    method: 'put',
    url: `/company/department/${data.id}`,
    data
  })
}
/**
 * 根据id删除部门
 * @param {*} id
 * @returns
 */
export function delDepartment(id) {
  return request({
    method: 'delete',
    url: `/company/department/${id}`

  })
}
/**
 * 根据id查询部门详情
 * @param {*} id
 * @returns
 */
export function getDepartmentDetails(id) {
  return request({
    method: 'get',
    url: `/company/department/${id}`
  })
}
